function z = brown_dennis(x)
%Brown and Dennis function
%n=4,m>=n,x0=[25,5,-5,-1]
%fmin1=85822.2 if m=20 
%Author:Ji Lin
m=20;
t=(1:m)/5;
z=ones(1,m);
for ii=1:m
    z(ii)=(x(1)+t(ii)*x(2)-exp(t(ii)))^2+(x(3)+x(4)*sin(t(ii))-cos(t(ii)))^2;
end
z=sum(z.^2);